<?php
/**
 * Created by PhpStorm.
 * User: Michael Ma
 * Date: 2017/4/16
 * Time: 21:18
 * 发布需求的未确认任务
 */

header("Content-Type: text/plain;charset=utf-8");
header("Access-Control-Allow-Origin:*");
header("Access-Control-Methods:POST,GET");

//载入user类
require_once ("classes/user.php");

//接受前台传来的数据
$id = isset($_POST['id']) ? $_POST['id'] : '';
$id = 2;

//实例化类
$allTask = new User();
$query = $allTask ->getUnconfirmTask1($id);
while($result = mysqli_fetch_assoc($query)){
    $info[] = $result;//将结果一条条存入$adminInfo
}
echo json_encode($info,JSON_UNESCAPED_UNICODE);

?>